import React, { Component } from 'react'
import Tabbar from '../common/index'
import { Carousel} from 'antd-mobile';
import{Link} from 'react-router-dom'
// import {NavLink} from 'react-router-dom'
import './index.less'
export default class Home extends Component {
    
    render() {
        const navList=[
            {id:1,src:require('../../img/首页-活动报名.png'),name:'活动报名',path:'/baoming'},
            {id:2,src:require('../../img/首页-场地预约.png'),name:'场地预约',path:'/yuyue'},
            {id:4,src:require('../../img/首页-讨论墙.png'),name:'讨论墙',path:'/taolun'},
            {id:3,src:require('../../img/首页-资源下载.png'),name:'资源下载',path:'/xiazai'},
            {id:5,src:require('../../img/首页-教学咨询.png'),name:'教师咨询',path:'/zixun'},
            {id:6,src:require('../../img/首页-微课视频.png'),name:'微课视频',path:'/weike'},
            {id:7,src:require('../../img/首页-审核.png'),name:'审核中心',path:'/shenhe'},
            {id:8,src:require('../../img/首页-在线学习.png'),name:'在线学习',path:'/online'},
            {id:9,src:require('../../img/调查问卷mdpi.png'),name:'调查问卷',path:'/diaocha'},
            {id:10,src:require('../../img/首页-在线报修.png'),name:'设备保修',path:'/shebei'},
        ]
        return (
            <div className="index">
                <div className="content">
                    <div className="banner">
                        <Carousel autoplay={true} infinite >
                            <img  src={require('../../img/首页-海报.png')} alt=""/>
                            <img  src={require('../../img/问卷调查-海报.png')} alt=""/>
                        </Carousel>
                    </div>
                    <div className="nav">
                    {
                        navList.map(item=>
                        <div className="nav-header" key={item.id} onClick={()=>this.props.history.push(item.path)}>
                            <img src={item.src} alt=""/>
                            <div className="nav-title">{item.name}</div>
                        </div>)
                    }
                    </div>
                    <div className="adver">
                        <div className="adver-first">
                            <Link to="/zixun"><img src={require('../../img/首页-名师在线.png')} alt=""/></Link>
                            <img src={require('../../img/首页-积分规则.png')} alt=""/>
                        </div>
                        <div className="adver-second">
                            <div>热门新闻</div>
                            <Link to="/newsdetail">
                                <span>更多</span>
                                <span><img src={require('../../img/向右.png')} alt=""/></span>
                            </Link>
                        </div>
                    </div>
                    <div className="newsList">
                        <div className="news-item" onClick={()=>this.props.history.push('/singledetails')}>
                            <div className="item-left">
                                <img src={require('../../img/20201230181910809.jpg')} alt=""/>
                            </div>
                            <div className="item-right">
                                <div className="onup">河南师范大学教发同仁来我校考察交流22222</div>
                                <div className="overdown">发布时间：2020-12-30 18:22</div>
                            </div>
                        </div>

                        <div className="news-item" onClick={()=>this.props.history.push('/singledetails')}>
                            <div className="item-left">
                                <img src={require('../../img/20201230181910809.jpg')} alt=""/>
                            </div>
                            <div className="item-right">
                                <div className="onup">河南师范大学教发同仁来我校考察交流22222</div>
                                <div className="overdown">发布时间：2020-12-30 18:22</div>
                            </div>
                        </div>
                        <div className="news-item" onClick={()=>this.props.history.push('/singledetails')}>
                            <div className="item-left">
                                <img src={require('../../img/20201230181910809.jpg')} alt=""/>
                            </div>
                            <div className="item-right">
                                <div className="onup">河南师范大学教发同仁来我校考察交流22222</div>
                                <div className="overdown">发布时间：2020-12-30 18:22</div>
                            </div>
                        </div>
                        <div className="news-item" onClick={()=>this.props.history.push('/singledetails')}>
                            <div className="item-left">
                                <img src={require('../../img/20201230181910809.jpg')} alt=""/>
                            </div>
                            <div className="item-right">
                                <div className="onup">河南师范大学教发同仁来我校考察交流22222</div>
                                <div className="overdown">发布时间：2020-12-30 18:22</div>
                            </div>
                        </div>

                    </div>
                </div>
                <Tabbar  {...this.props} />
            </div>
        )
    }
}
